Boolean Algebra

What is it?

Where does it come from and why is it important to us?

Boolean algebra and “normal algebra”

There are lots of similarities between Boolean algebra and “normal algebra,” also called elementary algebra. You’re already familiar with algebra involving real numbers. In addition to arithmetic operations dealing with specific values, algebra introduces variables – or quantities without fixed values. The use of variables allows general relationships between quantities to be formally expressed.

Boolean algebra differs from elementary algebra in that expressions denote the truth values true and false. Computer scientists often represent these as bits or binary digits 1 and 0. However, Boolean values do not behave like the integers 1 and 0.

Be aware that Boolean values are not the same thing as binary numbers. The binary number system is an alternative notation for the real numbers. Boolean values, on the other hand, represent something entirely different from numbers.

Operations

There are three basic operations in Boolean algebra.

These operations can be expressed by tabulating their values on a truth table as follows:

xx yy xyx \land y xyx \lor y ¬x\neg x
1 1 1 1 0
1 0 0 1 0
0 1 0 1 1
0 0 0 0 1

There are a number of secondary operations. Here are a few common ones.

Here’s a truth table tabulating their results:

xx yy xyx \to y xyx \oplus y xyx \equiv y
1 1 1 0 1
1 0 0 1 0
0 1 1 1 0
0 0 1 0 1

Well formed Boolean expressions

Any variable is a wff (well formed formula), i.e. xx
Any negated wff is a wff, i.e. ¬x\neg x
Any two wffs connected by a binary operation is a wff, i.e. ¬xy\neg x \lor y

This is called a recursive definition.

Laws

A law of the Boolean algebra is an identity between two Boolean expressions. Here are some examples:

Associativity of OR: x(yz)=(xy)zx \lor (y \lor z) = (x \lor y) \lor z
Associativity of AND: x(yz)=(xy)zx \land (y \land z) = (x \land y) \land z
Commutativity of OR: xy=yxx \lor y = y \lor x
Commutativity of AND: xy=yxx \land y = y \land x
Distributivity of AND over OR: x(yz)=(xy)(xz)x \land (y \lor z) = (x \land y) \lor (x \land z)
Distributivity of OR over AND: x(yz)=(xy)(xz)x \lor (y \land z) = (x \lor y) \land (x \lor z)
Identity for OR: x0=xx \lor 0 = x
Identity for AND: x1=xx \land 1 = x
Contradiction: x¬x=0x \land \neg x = 0
Tautology: x¬x=1x \lor \neg x = 1
Absorption: x(xy)=xx \land (x \lor y) = x
Absorption: x(xy)=xx \lor (x \land y) = x
Double Negation: ¬¬x=x\neg \neg x = x
DeMorgans: ¬x¬y=¬(xy)\neg x \land \neg y = \neg (x \lor y)
DeMorgans: ¬x¬y=¬(xy)\neg x \lor \neg y = \neg (x \land y)

Practice

Let’s work out some problems on the Boolean algebra worksheet